Add text to attribute

Good afternoon.
I have a question.
I have an object, obj. "Results" and he has a specific value, I want that every time when I run a script, the DOORS take the existing value of obj. "Results" and add one more sentence.
 
For example, in DOORS the avlue of the  obj. "Results" of the requirement 01 is "Its done"
When I run the script, the DOORS would take the "it's done" and add this sentence "I'm doing it again"
therefore the object at the end would have the value: "Its done I'm doing it again"
 
I tried using the "+ =" but  the DOORS says its not possible because it need to be  an enumerated attribute.
 
Anyone have any ideas?

Thanks


braolive - Thu Oct 17 14:51:52 EDT 2013

Re: Add text to attribute
llandale - Thu Oct 17 15:45:12 EDT 2013

It will need to be type Text, or String if you don't figure to do this much.

You need to get the value, append the new value, then set it

  • Buffer bufValue = create
  • for o in mod do
  • {  setEmpty(bufValue)
  •    bufValue = o."Results" ""
  •    bufValue += " Again"
  •    o."Results = tempStringOf(bufValue)
  • }
  • delete(bufValue)

"o.Name += Value" is indeed reserved for setting an enumeration of a multi-enum attr.

-Louie